package com.gitee.xhs.keyedState.listState;

import com.gitee.xhs.sampleRecod.transactionRecord.Transaction;
import org.apache.flink.api.common.state.ListStateDescriptor;
import org.apache.flink.api.common.typeinfo.TypeInformation;

import static com.gitee.xhs.StateConstant.FLINK_CHECK_POINT_PATH;

/**
 * @author BigHead
 * @date 2022/6/30 9:56
 * @description ListStateConstant
 */
public class ListStateConstant {

    public static final String CUSTOM_LIST_STATE_DIR = "listState/";

    public static final String LIST_STATE_PATH = FLINK_CHECK_POINT_PATH + CUSTOM_LIST_STATE_DIR;
    public static final String LIST_STATE_UID = "list-state-uid";
    public static final String LIST_STATE_NAME = "list-state";
    public static final ListStateDescriptor<Transaction> LIST_STATE_DESCRIPTOR = new ListStateDescriptor<Transaction>(
            LIST_STATE_NAME,
            TypeInformation.of(Transaction.class)
    );

}
